﻿using System.Collections.Generic;

namespace Library.Collections.Specialized
{
    public sealed class Comparer<T> : IComparer<T>, System.Collections.IComparer
    {
        public Comparer(IComparer<T> comparer)
        {
            this.comparer = comparer;
        }
        IComparer<T> comparer;

        public int Compare(T x, T y)
        {
            return comparer.Compare(x, y);
        }
        public int Compare(object x, object y)
        {
            return comparer.Compare((T)x, (T)y);
        }
    }
}
